import * as actionType from "./counter.type";
import { counterInitState } from "./counter.state";
export function counterReducer(state=counterInitState,action){
    switch(action.type){
        case actionType.ADD:
            return {
                value:state.value+1
            }
        case actionType.REDUCE:
            return {
                value:state.value-1
            }
        default:
            return {value:0}
    }
}